package com.ccrfid.rmc6.repository.device;

import com.ccrfid.rmc6.entity.device.CardView;
import com.ccrfid.rmc6.repository.search.SearchableRepository;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface CardViewRepository extends Repository<CardView, Long>, SearchableRepository<CardView> {


    int countAllByEnabledAndLowpowerStatus(int enabled, int lowPowerStatu);
    int countAllByEnabledAndCutoffStatus(int enabled, int cutOffStatu);
    int countAllByEnabledAndOnlineStatus(int enabled, int onlineStatu);


    int countAllByEnabledAndLowpowerStatusAndBindStatusAndPersonnelTypeAndOrgIdIn(int enabled, int lowPowerStatu, int bindStatus, Integer personnelType, List<Long> orgIdList);
    int countAllByEnabledAndCutoffStatusAndBindStatusAndPersonnelTypeAndOrgIdIn(int enabled, int cutOffStatu,int bindStatus, Integer personnelType, List<Long> orgIdList);
    int countAllByEnabledAndOnlineStatusAndBindStatusAndPersonnelTypeAndOrgIdIn(int enabled, int onlineStatu,int bindStatus, Integer personnelType, List<Long> orgIdList);

    int countAllByEnabled(Integer enabled);

    int countAllByEnabledAndBindStatusAndOrgIdIn(int enabled, int bindStatus, List<Long> orgIdList);

    int countAllByEnabledAndOnlineStatusAndCutoffStatusAndLowpowerStatus(Integer enabled,Integer onlineStatu, Integer cutOffStatu, Integer lowPowerStatu);

}
